//
//  TopView.m
//  LOLBOX
//
//  Created by lanou3g on 15/12/18.
//  Copyright © 2015年 张明. All rights reserved.
//

#import "TopView.h"

@implementation TopView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.frame = CGRectMake(0, 64,[UIScreen mainScreen].bounds.size.width, 35);
        [self setupView];
    }
    return self;
}
-(void)setupView
{
    NSArray *itemArr = @[@"最新",@"官方",@"赛事",@"美女"];
    self.seg = [[UISegmentedControl alloc]initWithItems:itemArr];
    self.seg.backgroundColor = [UIColor whiteColor];
    [self.seg setTintColor:[UIColor blackColor]];
    [self.seg setSelectedSegmentIndex:0];
    self.seg.frame = CGRectMake(0,0,self.frame.size.width,35);
    
    [self addSubview:_seg];
    
}

@end
